.course-detail-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;

  .page-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;

    button {
      margin-right: 20px;
    }

    h1 {
      margin: 0 0 0 15px;
      font-size: 24px;
    }
  }

  .course-info {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);

    .info-group {
      margin-bottom: 15px;

      &:last-child {
        margin-bottom: 0;
      }

      label {
        font-weight: bold;
        display: inline-block;
        min-width: 80px;
        margin-right: 10px;
      }

      p {
        margin: 10px 0;
        padding: 0 0 0 80px;
      }
    }
  }

  .action-group {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);

    h3 {
      margin-top: 0;
      margin-bottom: 15px;
      font-size: 18px;
    }

    .action-buttons {
      display: flex;
      gap: 10px;
      align-items: center;

      button {
        flex-shrink: 0;
      }

      input {
        flex-grow: 1;
        padding: 8px 12px;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        transition: all 0.3s;

        &:focus {
          border-color: #40a9ff;
          outline: none;
          box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
        }
      }
    }
  }

  .students-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);

    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;

      h3 {
        margin: 0;
        font-size: 18px;
      }
    }

    .student-table {
      width: 100%;
      border-collapse: collapse;

      th, td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #e8e8e8;
      }

      th {
        font-weight: bold;
        background-color: #fafafa;
      }

      tr:last-child td {
        border-bottom: none;
      }

      .btn-sm {
        padding: 4px 8px;
        font-size: 12px;
      }

      .btn-danger {
        background-color: #ff4d4f;
        color: white;
        border: none;

        &:hover {
          background-color: #ff7875;
        }
      }

      .sign-in-status {
        display: inline-block;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 12px;
        text-align: center;
        min-width: 60px;
        
        &.signed {
          background-color: #e8f5e9;
          color: #2e7d32;
          border: 1px solid #c8e6c9;
        }
        
        &.absent {
          background-color: #ffebee;
          color: #c62828;
          border: 1px solid #ffcdd2;
        }
      }
      
      .btn-sign-in {
        background-color: #2196f3;
        color: white;
        border: none;
        padding: 4px 8px;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.3s;
        
        &:hover {
          background-color: #1976d2;
        }
        
        &:disabled {
          background-color: #bbdefb;
          cursor: not-allowed;
        }
      }
    }

    .empty-tip {
      text-align: center;
      padding: 20px;
      color: #999;
    }
  }

  .loading, .error-message, .not-found {
    padding: 40px;
    text-align: center;
    font-size: 16px;
  }

  .error-message {
    margin: 15px 0;
    padding: 10px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 4px;
    border: 1px solid #ffcdd2;
  }

  .success-message {
    margin: 15px 0;
    padding: 10px;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    border: 1px solid #c8e6c9;
  }

  .active-task-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);

    h3 {
      margin-top: 0;
      margin-bottom: 15px;
      font-size: 18px;
    }

    .task-detail-card {
      background-color: #f9f9f9;
      border-radius: 6px;
      padding: 15px;
      border: 1px solid #e0e0e0;

      .task-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        
        @media (max-width: 768px) {
          grid-template-columns: 1fr;
        }
        
        .info-row {
          display: flex;
          align-items: center;
          margin-bottom: 8px;
          
          .label {
            font-weight: 500;
            color: #666;
            min-width: 80px;
            margin-right: 10px;
          }
          
          .value {
            color: #333;
          }

          .time-value {
            color: #464646;
            font-family: monospace;
            background-color: #f9f9f9;
            padding: 2px 6px;
            border-radius: 3px;
            border: 1px solid #e0e0e0;
            font-size: 13px;
          }
          
          .status {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 500;
            min-width: 60px;
            text-align: center;
            
            &.active {
              background-color: #e3f2fd;
              color: #1565c0;
              border: 1px solid #bbdefb;
            }
            
            &.finished {
              background-color: #f5f5f5;
              color: #757575;
              border: 1px solid #e0e0e0;
            }
          }
        }
      }

      .task-actions {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #e0e0e0;
        display: flex;
        justify-content: flex-end;
        
        .btn-danger {
          background-color: #f44336;
          color: white;
          border: none;
          padding: 8px 16px;
          border-radius: 4px;
          cursor: pointer;
          font-weight: 500;
          transition: background-color 0.3s;
          
          &:hover {
            background-color: #e53935;
          }
          
          &:disabled {
            background-color: #ffcdd2;
            cursor: not-allowed;
          }
        }
      }
    }
  }

  // 模态框样式
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }

  .modal {
    background-color: white;
    border-radius: 8px;
    width: 500px;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    .modal-header {
      padding: 15px 20px;
      border-bottom: 1px solid #f0f0f0;
      display: flex;
      justify-content: space-between;
      align-items: center;

      h3 {
        margin: 0;
        font-size: 18px;
      }

      .close-btn {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #999;

        &:hover {
          color: #666;
        }
      }
    }

    .modal-tabs {
      display: flex;
      border-bottom: 1px solid #f0f0f0;
      
      .tab-button {
        flex: 1;
        padding: 12px;
        border: none;
        background: none;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.3s;
        
        &.active {
          color: #1890ff;
          border-bottom: 2px solid #1890ff;
          font-weight: 500;
        }
        
        &:hover:not(.active) {
          color: #40a9ff;
        }
      }
    }

    .modal-body {
      padding: 20px;
      overflow-y: auto;
      max-height: 60vh;

      .error-message {
        color: #ff4d4f;
        background-color: #fff2f0;
        border: 1px solid #ffccc7;
        padding: 8px 12px;
        border-radius: 4px;
        margin-bottom: 15px;
        text-align: left;
      }

      .student-selection {
        max-height: 300px;
        overflow-y: auto;
        margin-bottom: 15px;
        border: 1px solid #f0f0f0;
        border-radius: 4px;
        padding: 10px;

        .student-item {
          margin-bottom: 8px;
          padding: 8px;
          border-radius: 4px;
          transition: background-color 0.2s;

          &:hover {
            background-color: #f9f9f9;
          }

          input[type="checkbox"] {
            margin-right: 8px;
          }

          label {
            cursor: pointer;
          }
        }
      }

      .create-student-form {
        padding: 10px 0;
        
        .error-message {
          color: #f44336;
          margin-bottom: 15px;
          font-size: 14px;
          padding: 5px 8px;
          background-color: #ffebee;
          border-radius: 4px;
        }
        
        .form-group {
          margin-bottom: 15px;
          
          label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
          }
          
          input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d9d9d9;
            border-radius: 4px;
            font-size: 14px;
            
            &:focus {
              border-color: #40a9ff;
              outline: none;
              box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
            }
          }
        }
        
        .search-student-wrapper {
          display: flex;
          gap: 10px;
          
          input {
            flex: 1;
          }
          
          button {
            white-space: nowrap;
          }
        }
        
        .student-info {
          padding: 8px 12px;
          background-color: #e3f2fd;
          border-radius: 4px;
          border: 1px solid #bbdefb;
          color: #1976d2;
          font-weight: 500;
        }
      }
    }

    .modal-footer {
      padding: 10px 20px;
      border-top: 1px solid #f0f0f0;
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      
      button {
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        
        &.btn-default {
          background-color: white;
          border: 1px solid #d9d9d9;
          color: rgba(0, 0, 0, 0.85);
          
          &:hover {
            border-color: #40a9ff;
            color: #40a9ff;
          }
        }
        
        &.btn-primary {
          background-color: #1890ff;
          border: 1px solid #1890ff;
          color: white;
          
          &:hover {
            background-color: #40a9ff;
            border-color: #40a9ff;
          }
          
          &:disabled {
            background-color: #d9d9d9;
            border-color: #d9d9d9;
            color: rgba(0, 0, 0, 0.25);
            cursor: not-allowed;
          }
        }
      }
    }
  }

  .class-students-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);

    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;

      h2 {
        margin: 0;
        font-size: 20px;
      }
    }

    .student-list {
      width: 100%;
      overflow-x: auto;

      table {
        width: 100%;
        border-collapse: collapse;

        th, td {
          padding: 12px 15px;
          text-align: left;
          border-bottom: 1px solid #e8e8e8;
        }

        th {
          font-weight: bold;
          background-color: #fafafa;
        }

        tr:hover {
          background-color: #f5f5f5;
        }

        .btn-small {
          padding: 4px 8px;
          font-size: 12px;
          border-radius: 4px;
        }
      }
    }

    .empty-data {
      text-align: center;
      padding: 20px;
      color: #999;
    }

    .loading {
      text-align: center;
      padding: 20px;
      color: #1890ff;
    }

    .error-message {
      margin: 15px 0;
      padding: 10px;
      background-color: #ffebee;
      color: #c62828;
      border-radius: 4px;
      border: 1px solid #ffcdd2;
    }
  }
}

// 按钮样式
.btn {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  border: 1px solid transparent;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.6;
  }

  &.btn-default {
    background-color: white;
    border-color: #d9d9d9;
    color: rgba(0, 0, 0, 0.65);

    &:hover:not(:disabled) {
      color: #40a9ff;
      border-color: #40a9ff;
    }
  }

  &.btn-primary {
    background-color: #1890ff;
    color: white;

    &:hover:not(:disabled) {
      background-color: #40a9ff;
    }
  }

  &.btn-danger {
    background-color: #ff4d4f;
    color: white;

    &:hover:not(:disabled) {
      background-color: #ff7875;
    }
  }
} 